/**
 * @author lscl
 * @version 1.0
 * @intro:
 */
public class Computer {

    private String brand;
    private double price;

    // 构造方法(对象在创建的时候一定会调用对应的构造方法),JVM对任何一个Java都提供了一个空参构造方法(前提是你没有提供任何的构造方法)
    public Computer(){
    }

    public Computer(String brand,double price){
        this.brand=brand;
        this.price=price;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public String getBrand() {
        return brand;
    }

    public double getPrice() {
        return price;
    }

    public void show() {
        System.out.println("品牌【" + brand + "】，价格【" + price + "】");
    }
}
